package top.psjj.news.service.impl;

import top.psjj.news.dao.AdminDao;
import top.psjj.news.po.TAdmin;
import top.psjj.news.service.AdminService;
import top.psjj.news.utils.MD5Util;

/**
 * @Auther:小陈的Java
 */
public class AdminServiceImpl implements AdminService {
    private AdminDao adminDao = new AdminDao();
    @Override
    public TAdmin login(String username,String password)throws Exception{
        password = MD5Util.getMD5Str(password);
        TAdmin tAdmin = adminDao.queryAdminByUsernameAndPassword(username,password);
        return tAdmin;
    }
}
